/* eslint valid-jsdoc: "off" */

'use strict';

/**
 * @param {Egg.EggAppInfo} appInfo app info
 */
module.exports = appInfo => {
  /**
   * built-in config
   * @type {Egg.EggAppConfig}
   **/
  const config = exports = {
    security:{
      csrf:false
    },
    mysql:{
      client:{
        host:"localhost",
        port:"3306",
        user:"root",
        password:"123456",
        database:"db_login"
      }
    },
    middleware:["auth"],
    session:{
      renew:false,
      key: 'EGG_SESS', // 存储 `Session` 的 `Cookie` 键值对的 key
      maxAge: 24 * 3600 * 1000
    },
    oss:{
      client: {
        accessKeyId: 'LTAI5tSMmScppfGN55DYW7W3',
        accessKeySecret: 'UWPiUJvjsGOiEZxJT5JrqlEmok5YSv',
        bucket: "1907cload",
        endpoint: 'oss-cn-beijing.aliyuncs.com',
        timeout: '60s',
      },
    },
    multipart:{
      mode:"file"
    },
    io:{
      init: { }, // passed to engine.io
      namespace: {
        '/': {
          connectionMiddleware: [],
          packetMiddleware: [],
        },
      }
    }
}

  // use for cookie sign key, should change to your own and keep security
  config.keys = appInfo.name + '_1644895508401_7820';

  return {
    ...config
  };
};
